local jianxiong = fk.CreateSkill {
  name = "mini__jianxiong",
}

Fk:loadTranslationTable{
  ["mini__jianxiong"] = "奸雄",
  [":mini__jianxiong"] = "当你于你的回合内使用牌造成伤害后，你可以获得造成伤害的牌（每回合每牌名的牌限一次）。",
}

jianxiong:addEffect(fk.Damage, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(jianxiong.name) and
      data.card and player.room:getCurrent() == player and
      not table.contains(player:getTableMark("mini__jianxiong-turn"), data.card.trueName) and
      player.room:getCardArea(data.card) == Card.Processing
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:addTableMark(player, "mini__jianxiong-turn", data.card.trueName)
    room:obtainCard(player, data.card, true, fk.ReasonPrey, player, jianxiong.name)
  end,
})

return jianxiong
